nl.ivojonker.icn.configuration.services
Class ConfigurationService

java.lang.Object
  extended by com.ibm.ecm.extension.PluginService
      extended by nl.ivojonker.icn.configuration.services.ConfigurationService

public class ConfigurationService
extends com.ibm.ecm.extension.PluginService

The ConfigurationService handles the retrieval of configuration and status, and serves as a proxy in creating the required configuration table.

Author:
nl.ivojonker

Field Summary
private static java.util.logging.Logger logger
           
 
Constructor Summary
ConfigurationService()
           
 
Method Summary
 void execute(com.ibm.ecm.extension.PluginServiceCallbacks callbacks, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Executes a specific instruction(provided as parameter).
 java.lang.String getId()
          
 java.lang.String getOverriddenService()
          not used / nothing overridden.
private  com.ibm.json.java.JSONObject getStatus()
          Used for the plugin/configuration screen to show status and config.
private  boolean isAdminUser(javax.servlet.http.HttpServletRequest request)
          Checks if the current user is admin user.
 
Methods inherited from class com.ibm.ecm.extension.PluginService
isSecureService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private static java.util.logging.Logger logger
Constructor Detail

ConfigurationService

public ConfigurationService()
Method Detail

getId

public java.lang.String getId()

Specified by:
getId in class com.ibm.ecm.extension.PluginService

getOverriddenService

public java.lang.String getOverriddenService()
not used / nothing overridden.

Overrides:
getOverriddenService in class com.ibm.ecm.extension.PluginService

execute

public void execute(com.ibm.ecm.extension.PluginServiceCallbacks callbacks,
                    javax.servlet.http.HttpServletRequest request,
                    javax.servlet.http.HttpServletResponse response)
             throws java.lang.Exception
Executes a specific instruction(provided as parameter). Some actions require administrator privileges. instructions: config -> returns configuration; primarily used for frontend dojo/CentralConfiguration status -> returns status; only used on the configuration pane createtable/droptable; for creating / dropping the table in the configured datasource. only used on the configuration pane persist -> for persisting configuration.

Specified by:
execute in class com.ibm.ecm.extension.PluginService
Throws:
java.lang.Exception

getStatus

private com.ibm.json.java.JSONObject getStatus()
Used for the plugin/configuration screen to show status and config.

Returns:
json containing confoigured tablename, JNDI datasource, configuration and status.

isAdminUser

private boolean isAdminUser(javax.servlet.http.HttpServletRequest request)
Checks if the current user is admin user. TODO: Function possibly not future proof in case group-support is added as adminUsers setting.

Parameters:
request - containing a valid session
Returns: